#ifndef REMOTE_CONNECTION_DEF_ERROR_CODE_DEF_H
#define REMOTE_CONNECTION_DEF_ERROR_CODE_DEF_H

#define FALCON_ERROR_CODE_LIST                    \
    FALCON_ERROR_CODE(SUCCESS)                    \
    FALCON_ERROR_CODE(PATH_IS_INVALID)            \
    FALCON_ERROR_CODE(PATH_IS_ROOT)               \
    FALCON_ERROR_CODE(PATH_EXISTS)                \
    FALCON_ERROR_CODE(PATH_NOT_EXISTS)            \
    FALCON_ERROR_CODE(PATH_LOCK_CONFLICT)         \
    FALCON_ERROR_CODE(PATH_VERIFY_FAILED)         \
    FALCON_ERROR_CODE(REMOTE_TRANSFER_FAILED)     \
    FALCON_ERROR_CODE(WRONG_WORKER)               \
    FALCON_ERROR_CODE(OBSOLETE_SHARD)             \
    FALCON_ERROR_CODE(REMOTE_QUERY_FAILED)        \
    FALCON_ERROR_CODE(ARGUMENT_ERROR)             \
    FALCON_ERROR_CODE(INODE_ROW_TYPE_ERROR)       \
    FALCON_ERROR_CODE(FILE_EXISTS)                \
    FALCON_ERROR_CODE(FILE_NOT_EXISTS)            \
    FALCON_ERROR_CODE(OUT_OF_MEMORY)              \
    FALCON_ERROR_CODE(STREAM_ERROR)               \
    FALCON_ERROR_CODE(PROGRAM_ERROR)              \
    FALCON_ERROR_CODE(SMART_ROUTE_ERROR)          \
    FALCON_ERROR_CODE(UNDEFINED)                  \
    FALCON_ERROR_CODE(MKDIR_DUPLICATE)            \
    FALCON_ERROR_CODE(XKEY_EXISTS)                \
    FALCON_ERROR_CODE(XKEY_NOT_EXISTS)            \
    FALCON_ERROR_CODE(VERSION_OUT_OF_DATE)        \
    FALCON_ERROR_CODE(INVALID_PARAMETER)          \
    FALCON_ERROR_CODE(UNKNOWN)                    \
    FALCON_ERROR_CODE(SERVER_FAULT)               \
    FALCON_ERROR_CODE(ZK_NOT_CONNECT)             \
    FALCON_ERROR_CODE(ZK_FETCH_RESULT_FAILED)     \
    FALCON_ERROR_CODE(TRANSACTION_FAULT)          \
    FALCON_ERROR_CODE(POOLED_FAULT)               \
    FALCON_ERROR_CODE(NOT_FOUND_FD)               \
    FALCON_ERROR_CODE(GET_ALL_WORKER_CONN_FAILED) \
    FALCON_ERROR_CODE(IO_ERROR)                   \
    FALCON_ERROR_CODE(READDIR_RENEW_CONN)         \
    FALCON_ERROR_CODE(LAST_FALCON_ERROR_CODE)

#undef FALCON_ERROR_CODE
#define FALCON_ERROR_CODE(code) code,
typedef enum FalconErrorCode { FALCON_ERROR_CODE_LIST } FalconErrorCode;

#endif
